package pers.cz.logtail.connect;

/**
 * @program: postgirl-collection-client
 * @description: 连接
 * @author: Cheng Zhi
 * @create: 2022-07-31 12:48
 **/
public interface IConnection extends AutoCloseable{

    public void close();
    public void insert(String content);
    public void insert(String key, String content);
    public void insert(String ip, String fileName, String content);
    public void set(String key, String value);
    public String get(String key);

    /**
     * 自增
     * @param key
     * @return
     */
    public Long autoIncrement(String key);

    /**
     * 设置过期事件
     * @param key
     * @param time
     */
    public void expire(String key, Integer time);
}
